import enUS from "ant-design-vue/es/locale/en_US";
import zhCN from "ant-design-vue/es/locale/zh_CN";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";

const antdLocales = {
  cn: zhCN,
  en: enUS,
};

export const useAntdLocale = (locale) => {
  let lang = locale;
  dayjs.locale(antdLocales[lang]);
  return antdLocales[lang];
};
